<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>Novo administrador</title>
    </h:head>
    <h:body>
        <p:messages id="messagesPanel" />
        <p:panel header="Adminstrador" style="text-align: center; width: 500px; margin: 0 auto;" >            
            <fieldset>
                <h:graphicImage value="administrator-icon.png"/>
                <h:form id="form">
                    Email(usuario): <p:inputText value ="#{cadastroAdministrador.email}" required="true" requiredMessage="O campo Email é obrigatorio"/><br/>
                    Senha: <p:inputText value ="#{cadastroAdministrador.senha}" required="true" requiredMessage="O campo Senha é obrigatorio"/><br/>
                    <p:commandButton value="Cadastrar" action="#{cadastroAdministrador.cadastrarNovoAdmin()}" update="messagesPanel,form"/><br/>
                    <h:commandLink value="Voltar" action="index.xhtml" immediate="true"/><br/>
                </h:form>
            </fieldset>
        </p:panel>
    </h:body>
</html>